<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <home></home>
        <home2></home2>
        <home3></home3>
    </div>
    <script src="./vue.js"></script>
    <script>
        // properties 缩写 
        let Child = {
          
            template:`
                <div>
                    <h1>子组件的头部</h1>
                    <slot/> 
                    <!-- 插槽 占位的 -->
                    <h1>子组件的尾部</h1>
                 
                </div>
            `
          
        }
        let Home = {
            template:`
                <div>
                  父组件1
                  <child>
                    <button>我是父组件1中的标签</button>
                  </child>
                </div>
            `,
            components:{
                Child 
            }
        }

        let Home2 = {
            template:`
                <div>
                  父组件2
                  <child>
                    <input />
                  </child>
                </div>
            `,
            components:{
                Child 
            }
        }
        let Home3 = {
            template:`
                <div>
                  父组件2
                </div>
            `,
            components:{
                Child 
            }
        }

     
        Vue.component("Home",Home);
        Vue.component("Home2",Home2);
        Vue.component("Home3",Home3);
        let vm = new Vue({
            el:"#app"
        })

    </script>
</body>
</html>